<?
	$sess = new Zend_Session_Namespace(CLU_NS);
?>

<script type="text/javascript">
$(function(){
	if($('#content_module').val() == 'node')
		$('div.type').show();
	else
		$('div.type').hide();
		
	$("#content_module").change(function()
	{   
		if($('#content_module').val() == 'node')
			$('div.type').show();
		else
			$('div.type').hide();
		
		$.getJSON("/en/admin/ajax/get-data-widget-positions",
			{
				content_module: $("#content_module").val(), 
				themes: $("#themes").val(),
				site: 'hvn',
			}, 
            function(json){
                var options = '';
                for (var i = 0; i < json.length; i++) {
                       options += '<option value="' + json[i].name + '">' + json[i].name + '</option>';
                }
               	$("#request").html(options);
         })
     });
     
    $("#request").change(function()
	{   
		$.getJSON("/en/admin/ajax/get-widget-name",
			{
				master_request: $("#request").val(), 
			}, 
            function(json){
                var options = '';
                for (var i = 0; i < json.length; i++) {
                       options += '<option value="' + json[i].id + '">' + json[i].widget_name + '</option>';
                }
               	$("#widget_position_id").html(options);
         })
     });
});
</script>
<div style="background-color:#ffffff">
<form accept-charset="UTF-8" action="<?= $this->escape($this->viewParams['form']->getAction()) ?>"
      method="<?= $this->escape($this->viewParams['form']->getMethod()) ?>">
<br>
<b>Choose module name and widget identifier want to order weight:</b>
<br/>
<br/>
<table width="80%">
<tr>
<td width="20%"> Themes: </td>
<td> <?=$this->viewParams['form']->themes?> 
</td>
</tr>

<td width="20%"> Choose Module: </td>
<td> <?=$this->viewParams['form']->content_module?>
	<div class="type">
	Type: <?=$this->viewParams['form']->type?>
	</div>
</td>
</tr>

<tr>
<td width="20%"> Request/Page: </td>
<td> <?=$this->viewParams['form']->request?> 
</td>
</tr>

<tr>
<td width="20%"> Widget Name: </td>
<td> <?=$this->viewParams['form']->widget_position_id?> 
</td>
</tr>

</table>
<input type="hidden" name="cluSearch" value="1" />
<?=$this->viewParams['form']->submit?>
</form>
</div>
